//
//  DKCore.m
//  DanaKreditLoan
//
//  Created by ZhengChengFeng on 2024/10/18.
//

#import "DKCore.h"
#import "SplashViewController.h"

@implementation DKCore

singleton_implementation(DKCore)

- (void)appFirstLaunch{
   
    SplashViewController *vc = [[SplashViewController alloc]init];
    UINavigationController *naV = [[UINavigationController alloc]initWithRootViewController:vc];
    [UIApplication sharedApplication].delegate.window.rootViewController = naV;
        
}

- (void)loadMainTabbarController{
    
    if (!self.mainTabbarController) {
        self.mainTabbarController = [[MainTabBarController alloc]init];
        [UIApplication sharedApplication].delegate.window.rootViewController = self.mainTabbarController;
    }
    
    /*
    if (![[CurrentUser mine] hasLogged]) {
        LoginViewController *login = [[LoginViewController alloc]init];
        UINavigationController *naV = [[UINavigationController alloc]initWithRootViewController:login];
        [UIApplication sharedApplication].delegate.window.rootViewController = naV;
    }
    else{
        if (!self.mainTabbarController) {
            self.mainTabbarController = [[MainTabBarController alloc]init];
            [UIApplication sharedApplication].delegate.window.rootViewController = self.mainTabbarController;
        }
    }
     */
    

}

@end
